<?php
/**
 *  $status   true   false
 *  $data    数据
 *  $msg    提示信息 
 */
function return_json($status = FALSE,$data = NULL,$msg = '')
{
    header('Content-Type: application/json; charset=utf-8');
	 echo json_encode(array(
            'code' => $status,
            'msg'  => $msg,
            'data' => $data
        ));
     die;
}

function return_json_data($data)
{
	header('Content-Type: application/json; charset=utf-8');
	echo json_encode($data);
	die;
}
?>